package cn.yuanqiao.archive.bianyan.mapper;

import cn.yuanqiao.archive.bianyan.domain.YqZhuantiChengguo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 专题成果Mapper接口
 *
 * @ProjectName: ruoyi-modules-system
 * @Package: cn.yuanqiao.archive.bianyan.mapper
 * @ClassName: YqZhuantiChengguoMapper
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2023/7/11 11:04
 * @Version: 1.0
 */
public interface YqZhuantiChengguoMapper {
    /**
     * 查询专题成果
     *
     * @param chengguoId 专题成果主键
     * @return 专题成果
     */
    public YqZhuantiChengguo selectYqZhuantiChengguoByChengguoId(@Param("chengguoId") String chengguoId, @Param("tableNmae") String tableNmae);

    public List<YqZhuantiChengguo> selectYqZhuantiChengguoByChengguoIdS(@Param("ids") String[] ids, @Param("tableNmae") String tableNmae);

    /**
     * 查询专题成果列表
     *
     * @param ztcg 专题成果
     * @return 专题成果集合
     */
    public List<YqZhuantiChengguo> selectYqZhuantiChengguoList(@Param("ztcg") YqZhuantiChengguo ztcg, @Param("tableNmae") String tableNmae);

    /**
     * 新增专题成果
     *
     * @param ztcg 专题成果
     * @return 结果
     */
    public int insertYqZhuantiChengguo(@Param("ztcg") YqZhuantiChengguo ztcg, @Param("tableNmae") String tableNmae);

    /**
     * 修改专题成果
     *
     * @param ztcg 专题成果
     * @return 结果
     */
    public int updateYqZhuantiChengguo(@Param("ztcg") YqZhuantiChengguo ztcg, @Param("tableNmae") String tableNmae);

    /**
     * 删除专题成果
     *
     * @param chengguoId 专题成果主键
     * @return 结果
     */
    public int deleteYqZhuantiChengguoByChengguoId(@Param("chengguoId") String chengguoId, @Param("tableNmae") String tableNmae);

    /**
     * 批量删除专题成果
     *
     * @param chengguoIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYqZhuantiChengguoByChengguoIds(@Param("chengguoIds") String[] chengguoIds, @Param("tableNmae") String tableNmae);

    /**
     * 修改发布状态
     * @param ids  成果id
     * @param issueState  发布状态
     * @return
     */
    public int updateIssueState(@Param("ids") String[] ids, @Param("tableNmae") String tableNmae, @Param("issueState") String issueState);

    int insertYqZhuantiChengguoList(@Param("chengguoList") List<YqZhuantiChengguo> yqZhuantiChengguoList, @Param("tableName") String tableName);

    int getCountByTypeId(@Param("typeId") Long id, @Param("tableName")String tableName);
}
